[t:/]$ 지식_

grep 버그가 의심된다.

2018/04/16

천년묵은 grep에 버그가 있나.. rg라는 고속 검색기하고 비교하니까 차이가 난다. -o 옵션을 써서 전체 검색어 갯수를 세는 작업이다. 내가 개인적으로 짠 코드에서도 rg와 같은 값이 나온다.. 그러니까 grep 이 의심된다는 이야그.

뭐지??

keeptalk@dawnsea-ubuntu:~/hash_test$ time rg -e 'diseases|sleep|middle|to|among|tot' -on pubmed.csv | wc -l
19888508

real    0m32.216s
user    0m21.265s
sys 0m32.591s
keeptalk@dawnsea-ubuntu:~/hash_test$ time grep -E 'diseases|sleep|middle|to|among|tot' -on pubmed.csv | wc -l
19760262

real    0m29.607s
user    0m29.754s
sys 0m1.127s
keeptalk@dawnsea-ubuntu:~/hash_test$ 




공유하기













[t:/] is not "technology - root". dawnsea, rss